﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WF_ExportTool.Configuration.DataV
{
    /*
     *desc:图表实体
         */
    public class DataV_Main:BaseEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int DataVId { get; set; }
        /// <summary>
        /// 编号
        /// </summary>
        public string DataVCode { get; set; }
        public int AutoIndex { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string DataVTitle { get; set; }
        public int SysId { get; set; }
        /// <summary>
        /// 所属业务功能:
        /// </summary>
        public string FuncTitle { get; set; }
        /// <summary>
        /// 是否受权限控制:
        /// </summary>
        public Boolean IsControlByRight { get; set; }
        /// <summary>
        /// 拥有权限的角色名称
        /// </summary>
        public string RoleNames { get; set; }
        /// <summary>
        /// 拥有权限的角色编码:
        /// </summary>
        public string RoleIds { get; set; }
        /// <summary>
        /// 拥有权限的用户名称
        /// </summary>
        public string UserNames { get; set; }
        /// <summary>
        /// 拥有权限的用户编码
        /// </summary>
        public string UserIds { get; set; }
        /// <summary>
        /// 拥有权限的部门名称
        /// </summary>
        public string DepNames { get; set; }
        /// <summary>
        /// 拥有权限的部门编码
        /// </summary>
        public string DepIds { get; set; }
        /// <summary>
        /// 扩展JS:
        /// </summary>
        public string JSEx { get; set; }
    }
    /// <summary>
    /// 统计图
    /// </summary>
    public class DataV_Statistics : BaseEntity {
        /// <summary>
        /// 主键
        /// </summary>
        public int StatisticsId { get; set; }
        /// <summary>
        /// 基本信息主键
        /// </summary>
        public int DataVId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int ParentStatisticsId { get; set; }
        /// <summary>
        /// 统计图类型
        /// </summary>
        public int StatisticsType { get; set; }
        /// <summary>
        /// 统计图标题
        /// </summary>
        public string StatisticsTitle { get; set; }
        /// <summary>
        /// 是否显示标题
        /// </summary>
        public Boolean IsShowTitle { get; set; }
        /// <summary>
        /// Y轴类型
        /// </summary>
        public int StatisticsYType { get; set; }
        /// <summary>
        /// 显示高度
        /// </summary>
        public int StatisticsHeight { get; set; }
        /// <summary>
        /// 显示顺序
        /// </summary>
        public int DispOrder { get; set; }
        /// <summary>
        /// X轴数据源数据库链接实例
        /// </summary>
        public string XDataSourceInstance { get; set; }
        /// <summary>
        /// X轴数据源SQL语句，SQL语句返回单字段即可
        /// </summary>
        public string XDataSource { get; set; }
    }

    public class DataV_ChartSeries : BaseEntity {
        /// <summary>
        /// 主键
        /// </summary>

        public int SeriesId { get; set; }
        /// <summary>
        /// 统计图主键
        /// </summary>
        public int StatisticsId { get; set; }
        /// <summary>
        /// 图表主键
        /// </summary>
        public int DataVId { get; set; }
        /// <summary>
        /// 系列标题
        /// </summary>
        public string SeriesTitle { get; set; }
        /// <summary>
        /// 数据源类型
        /// </summary>
        public int MainDataSourceType { get; set; }
        /// <summary>
        /// 数据源为SQL语句时，对应的数据库链接实例
        /// </summary>
        public string MainDataSourceInstance { get; set; }
        /// <summary>
        /// 主数据源内容
        /// </summary>
        public string MainDataSource { get; set; }
        /// <summary>
        /// 数据源中存储X轴值的字段名
        /// </summary>
        public string XField { get; set; }
        /// <summary>
        /// Y轴标题
        /// </summary>
        public string YTitle { get; set; }
        /// <summary>
        /// 数据源中存储Y轴值的字段名
        /// </summary>
        public string YField { get; set; }
        /// <summary>
        /// 数值是否显示在图表上
        /// </summary>
        public Boolean IsShowData { get; set; }
        /// <summary>
        /// 本级图表传给下一级图表的查询条件，格式即为sql语句中where的查询条件，支持表达式; 或配置需要执行的自定义方法
        /// </summary>
        public string LevelCondition { get; set; }
        /// <summary>
        /// 下级图表打开方式
        /// </summary>
        public int LevelOpenType { get; set; }
        public string YSumPointNum { get; set; }
        /// <summary>
        /// Y轴数值前缀
        /// </summary>
        public string DataPrefix { get; set; }
        /// <summary>
        /// Y轴数值后缀
        /// </summary>
        public string DataSuffix { get; set; }
    }
    /// <summary>
    /// 数据统计布局配置
    /// </summary>

    public class DataV_Layout : BaseEntity {
        /// <summary>
        /// 
        /// </summary>
        public int LayoutId { get; set; }
        /// <summary>
        /// 布局编号
        /// </summary>
        public string LayoutCode { get; set; }
        public int AutoIndex { get; set; }
        /// <summary>
        /// 图表主键
        /// </summary>
        public int DataVId { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string LayoutTitle { get; set; }
        /// <summary>
        /// 布局类型
        /// </summary>
        public int LayoutType { get; set; }
        /// <summary>
        /// 自定义布局--html内容
        /// </summary>
        public string LayoutHTML { get; set; }
    }
}
